<template>
  <div class="app-container">
    <iframe
      :src="src"
      width="100%"
      scrolling="no"
      frameborder="0"
      class="tableli_che1"
    ></iframe>
  </div>
</template>

<script>
import { driver_capacity } from "@/api/distribution/distributionCapacity";
import { apiUrl, objKeySort, Md5 } from "@/utils/public";

export default {
  components: {},
  data() {
    return {
      src: "",
      query_timer: "",
    };
  },
  created() {
    this.driver_capacity();
    // this.query_timer = setInterval(() => {
    //   this.driver_capacity();
    // }, 1000);
  },
  methods: {
    driver_capacity() {
      let data = Object.assign(
        {
          sign: Md5(
            objKeySort(Object.assign(apiUrl().name)) + apiUrl().appsecret
          ),
        },
        apiUrl().name
      );
      driver_capacity(data).then((res) => {
        if (res.data) {
          this.src = res.data;
        }
      });
    },
  },
  destroyed() {
    // clearInterval(this.query_timer);
  },
};
</script>
<style lang="scss" scoped>
.app-container {
  padding: 0;
  width: 100%;
  height: calc(100vh - 130px);
}
iframe {
  width: 100%;
  height: 100%;
}
</style>
